<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.css">
    <style>
        .account{
            width: 400px;
            margin: 0 auto;
        }
    </style>
</head>
<body>

<div class="account">
    <h1 style="text-align: center;"><p>注册</p></h1>
    <form>
        {% for field in form %}
            <div class="form-group">
                {% if field.name == 'code' %}
                    <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
                    <div class="clearfix">
                        <div class="col-md-6" style="padding-left: 0; width: 150px">{{ field }}</div>
                        <div class="col-md-6"><input type="button" class="btn btn-default"  value="获取验证码"></div>
                    </div>
                {% else %}
                    <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
                    {{ field }}
                {% endif %}
            </div>

        {% endfor %}


      <button type="submit" class="btn btn-primary">提交</button>
    </form>
</div>

</body>
</html>